|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface LuceneIndexBatchInserter
The "batch inserter" version of LuceneIndexService. It should be used
with a BatchInserter and stores the indexes in the same format as
LuceneIndexService.
It's optimized for large chunks of either reads or writes. So try to avoid
mixed reads and writes because there's a slight overhead to go from read mode
to write mode (the "mode" is per key and will not affect other keys)
See more information at
http://wiki.neo4j.org/content/Indexing_with_BatchInserter
| Method Summary | |
|---|---|
org.neo4j.kernel.impl.batchinsert.BatchInserter |
getBatchInserter()
|
IndexService |
getIndexService()
|
IndexHits<Long> |
getNodes(String key,
Object value)
Queries the lucene index for hits given the key and value
. |
long |
getSingleNode(String key,
Object value)
|
void |
index(long node,
String key,
Object value)
Adds an entry to the index. |
void |
optimize()
Performs a Lucene optimize on the index files. |
void |
shutdown()
Shuts down this index and closes its underlying lucene index files. |
| Method Detail |
|---|
void index(long node,
String key,
Object value)
node - the node to associate with the value in the index
with name key.key - which index to put it in.value - the value to associate node with.void shutdown()
IndexHits<Long> getNodes(String key,
Object value)
key and value
. The usage of getNodes(String, Object),
getSingleNode(String, Object) should be as separated as possible
from the usage of index(long, String, Object). so that the
performance penalty gets as small as possible. Also see
optimize() for separation between writes and reads.
key - the index.value - the value to query for.
void optimize()
IndexWriter.optimize()
long getSingleNode(String key,
Object value)
key - the index key to query.value - the value to query for.
IndexService getIndexService()
IndexService
interface for convenience. Goes well with an instance from
BatchInserter.getGraphDbService().org.neo4j.kernel.impl.batchinsert.BatchInserter getBatchInserter()
BatchInserter used in conjunction with this index
batch inserter.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||